<template>
  <div class="diy-pop-adv" v-show="selected && diyItem.status">
    <div class="diy-pop-adv-modal-box">
      <img :src="diyItem.img" />
      <div class="diy-pop-adv-modal-close">
        <text class="icon icon-shibai1"></text>
      </div>
    </div>
    <div class="diy-pop-adv-modal-mask"></div>
  </div>
</template>
<script lang="ts">
export default {
  name: "storeDiyPreviewPopAdv",
};
</script>
<script  lang="ts" setup >
import { ref, getCurrentInstance } from "vue";
import { diyPopAdvDataType } from "@/types";

const {
  proxy: { $utils },
} = getCurrentInstance() as any;

const props = withDefaults(
  defineProps<{
    diyItem: diyPopAdvDataType;
    index: number | string;
    selected?: boolean;
  }>(),
  {
    diyItem: () => {
      return {
        img: "",
        layout: 1,
      };
    },
    index: 0,
    selected: false,
  }
);
</script>

<style scoped>
.diy-pop-adv {
  height: 100%;
  width: 100%;
}
.diy-pop-adv-modal-box {
  position: absolute;
  left: 5%;
  top: 100px;
  min-height: 300px;
  width: 90%;
  align-items: center;
  display: flex;
  z-index: 9;
  box-sizing: border-box;
}
.diy-pop-adv-modal-box .img {
  width: 100%;
  height: 70%;
  background: #ffffff;
}
.diy-pop-adv-modal-box img {
  width: 100%;
  align-items: center;
}
.diy-pop-adv-modal-close {
  position: absolute;
  height: 50px;
  width: 50px;
  bottom: -80px;
  left: calc(50% - 25px);
  text-align: center;
  align-items: center;
  line-height: 46px;
  color: #ffffff;
}
.diy-pop-adv-modal-close .icon {
  font-size: 30px;
  color: #ffffff;
}
.diy-pop-adv-modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 6;
}
</style>